/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * jifKardexAlmacen.java
 *
 * Created on 16-ago-2010, 17:27:12
 */

package GestionMovimientos;

import administracion.delegate.GestionPedidosDelegate;
import administracion.helper.Listas;
import administracion.helper.Utiles_Cadena;
import administracion.helper.Utiles_MensajesDialogo;
import administracion.propiedades.Propiedades;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.view.JasperViewer;
import suministros.ejb30.TO.AnoTO;
import suministros.ejb30.TO.EmpresaTO;

/**
 *
 * @author Diana
 */
public class jifKardexAlmacen extends javax.swing.JInternalFrame {
     List<EmpresaTO> empresas;
     List<AnoTO> anomes= new ArrayList<AnoTO>();
    /** Creates new form jifKardexAlmacen */
    public jifKardexAlmacen() {
        initComponents();
        empresas = Listas.getEmpresas();
        if(empresas.isEmpty()){
            this.jCheckBox1.setEnabled(false);
        }
        this.jCheckBox1.setSelected(false);
        this.llenarComboEmpresa();
        llenarMes();
        this.jcbEmpresa.setEnabled(false);
        
        this.jchkResumenGrupos.setVisible(false);
        this.jRadioButton1.setSelected(true);
        this.jchkInversion.setVisible(false);
        this.pack();
    }
     private void llenarComboEmpresa() {
        empresas = null;
        List listaPaises_cbo = this.cboBeanBindingEmpresa1.getLista();
        listaPaises_cbo.clear();
        try
        {
           if(this.jCheckBox1.isSelected()){
                empresas = Listas.getEmpresas();
            }
            else{
                empresas = Listas.getEmpresaPrincipal();
            }
          this.cboBeanBindingEmpresa1.setLista(empresas);
          this.bindingGroup.bind();
          this.jcbEmpresa.updateUI();
          this.jcbEmpresa.setSelectedIndex(0);
        } catch (Exception ex) {
          Utiles_MensajesDialogo.mensajeAlerta("Error al obtener empresas\n" + ex.getMessage());
          ex.printStackTrace();
          Logger.getLogger(jifIngresosAlmacen.class.getName()).log(Level.SEVERE, null, ex);
        }
      }
     public boolean buscarAnio(String anio){
         boolean encontrado=true;
         for(int i=0; i<this.jcbAnio.getItemCount(); i++){
             if(this.jcbAnio.getItemAt(i).toString().compareTo(anio)==0){
                 encontrado=false;
             }
         }
         return encontrado;
     }
     public boolean buscarMes(String mes){
         boolean encontrado=true;
         for(int i=0; i<this.jcbMes.getItemCount(); i++){
             if(this.jcbMes.getItemAt(i).toString().compareTo(mes)==0){
                 encontrado=false;
             }
         }
         return encontrado;
     }
     public void llenarMes(){
        try {
            anomes = GestionPedidosDelegate.getInstance().getParametrosKardex();
        } catch (Exception ex) {
           Utiles_MensajesDialogo.mensajeAlerta("No se han registrado ingresos o salidas de suministros en la empresa");
        }
        for(int i=0; i<anomes.size(); i++){
           if(buscarAnio(anomes.get(i).getAno()))
           this.jcbAnio.addItem(anomes.get(i).getAno());
        }
         for(int i=0; i<anomes.size(); i++){
             String mes=Utiles_Cadena.getMesAnio(anomes.get(i).getMes());
             if(buscarMes(mes))
                this.jcbMes.addItem(mes);
        }

     }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        cboBeanBindingEmpresa1 = new administracion.BeanBinding.CboBeanBindingEmpresa();
        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        jchkInversion = new javax.swing.JCheckBox();
        jcbEmpresa = new javax.swing.JComboBox();
        jCheckBox1 = new javax.swing.JCheckBox();
        jCheckBox2 = new javax.swing.JCheckBox();
        jLabel1 = new javax.swing.JLabel();
        jcbMes = new javax.swing.JComboBox();
        jLabel3 = new javax.swing.JLabel();
        jcbAnio = new javax.swing.JComboBox();
        jchkResumenGrupos = new javax.swing.JCheckBox();
        jButton2 = new javax.swing.JButton();
        jbtAceptar = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jRadioButton1 = new javax.swing.JRadioButton();
        jRadioButton2 = new javax.swing.JRadioButton();

        setIconifiable(true);
        setTitle("KARDEX DE MOVIMIENTOS");

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Busqueda Avanzada", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), new java.awt.Color(0, 0, 255))); // NOI18N

        jchkInversion.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jchkInversion.setText("VALORIZADO");
        jchkInversion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jchkInversionActionPerformed(evt);
            }
        });

        org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty.create("${lista}");
        org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboBeanBindingEmpresa1, eLProperty, jcbEmpresa);
        bindingGroup.addBinding(jComboBoxBinding);

        jcbEmpresa.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jcbEmpresaKeyPressed(evt);
            }
        });

        jCheckBox1.setFont(new java.awt.Font("Arial", 1, 12));
        jCheckBox1.setText("OTRAS EMPRESAS");
        jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox1ActionPerformed(evt);
            }
        });

        jCheckBox2.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jCheckBox2.setText("FORMATO PARA SUNAT");
        jCheckBox2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox2ActionPerformed(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel1.setText("MES:");

        jcbMes.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jcbMesKeyPressed(evt);
            }
        });

        jLabel3.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel3.setText("AÑO:");

        jcbAnio.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jcbAnioKeyPressed(evt);
            }
        });

        jchkResumenGrupos.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jchkResumenGrupos.setText("RESUMEN POR GRUPOS");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jchkResumenGrupos)
                    .addComponent(jchkInversion)
                    .addComponent(jCheckBox2)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jCheckBox1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jcbEmpresa, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addGap(18, 18, 18)
                        .addComponent(jcbMes, 0, 165, Short.MAX_VALUE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jcbAnio, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jcbMes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jcbAnio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addGap(9, 9, 9)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCheckBox1)
                    .addComponent(jcbEmpresa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jCheckBox2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jchkInversion)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 4, Short.MAX_VALUE)
                .addComponent(jchkResumenGrupos))
        );

        jButton2.setFont(new java.awt.Font("Arial", 1, 12));
        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconoscomb/16x16ozygen/actions/button_cancel.png"))); // NOI18N
        jButton2.setMnemonic('C');
        jButton2.setText("CANCELAR");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jbtAceptar.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jbtAceptar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconoscomb/16x16ozygen/actions/button_ok.png"))); // NOI18N
        jbtAceptar.setMnemonic('A');
        jbtAceptar.setText("ACEPTAR");
        jbtAceptar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtAceptarActionPerformed(evt);
            }
        });
        jbtAceptar.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jbtAceptarKeyPressed(evt);
            }
        });

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Tipo de Reporte", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), new java.awt.Color(0, 0, 255))); // NOI18N

        buttonGroup1.add(jRadioButton1);
        jRadioButton1.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jRadioButton1.setText("KARDEX MENSUAL");
        jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton1ActionPerformed(evt);
            }
        });

        buttonGroup1.add(jRadioButton2);
        jRadioButton2.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jRadioButton2.setText("BALANCE MATERIALES");
        jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jRadioButton2)
                    .addComponent(jRadioButton1))
                .addContainerGap(227, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addComponent(jRadioButton1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 3, Short.MAX_VALUE)
                .addComponent(jRadioButton2))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(83, 83, 83)
                        .addComponent(jbtAceptar)
                        .addGap(13, 13, 13)
                        .addComponent(jButton2))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbtAceptar)
                    .addComponent(jButton2))
                .addContainerGap())
        );

        bindingGroup.bind();

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jbtAceptarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtAceptarActionPerformed
    if(this.jRadioButton1.isSelected()){
        if(this.jCheckBox2.isSelected()){
        JasperViewer jv = null;
        JasperPrint jp = null;
        Map parametros = new HashMap();
        int mes= Utiles_Cadena.getMesAnioT(this.jcbMes.getSelectedItem().toString().trim());

        String emp=empresas.get(this.jcbEmpresa.getSelectedIndex()).getCodigo();
        parametros.put("ano", this.jcbAnio.getSelectedItem().toString().trim());
        parametros.put("mes",mes+"");
        parametros.put("empresa", emp);
        try {
            if(this.jchkInversion.isSelected()){
                    jp=GestionPedidosDelegate.getInstance().generarReporteIngreso("InventarioValorizadoFLP.jasper", parametros);
            }
            else{
                    jp=GestionPedidosDelegate.getInstance().generarReporteIngreso("InventarioUnidadesFLP.jasper", parametros);
               
            }
            
            jv = new JasperViewer(jp, false);
            jv.setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);
            jv.setVisible(true);
        }catch (Exception e) {
            Utiles_MensajesDialogo.mensajeError("No se pudo realizar la transaccion");
        }
    }
    else{
         JasperViewer jv = null;
            JasperPrint jp = null;
            Map parametros = new HashMap();
            int mes= Utiles_Cadena.getMesAnioT(this.jcbMes.getSelectedItem().toString().trim());

            String emp=empresas.get(this.jcbEmpresa.getSelectedIndex()).getCodigo();
            parametros.put("anio", this.jcbAnio.getSelectedItem().toString().trim());
            parametros.put("mes",mes+"");
            parametros.put("id_empresa", emp);
            try {
                if(this.jchkInversion.isSelected()){
                        jp=GestionPedidosDelegate.getInstance().generarReporteIngreso("SubKardexMensual.jasper", parametros);
                }
                else{
                        jp=GestionPedidosDelegate.getInstance().generarReporteIngreso("SubKardexMensualOperativo.jasper", parametros);

                }

                jv = new JasperViewer(jp, false);
                jv.setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);
                jv.setVisible(true);
            }catch (Exception e) {
                Utiles_MensajesDialogo.mensajeError("No se pudo realizar la transaccion");
            }
    }
    }
    if(this.jRadioButton2.isSelected()){
        JasperViewer jv = null;
        JasperPrint jp = null;
        Map parametros = new HashMap();
        int mes= Utiles_Cadena.getMesAnioT(this.jcbMes.getSelectedItem().toString().trim());

        String emp=empresas.get(this.jcbEmpresa.getSelectedIndex()).getCodigo();
        parametros.put("anio", this.jcbAnio.getSelectedItem().toString().trim());
        parametros.put("mes",mes+"");
        parametros.put("almacen", "01");
        parametros.put("empresa", emp);
            try {
                parametros.put("usuario", Propiedades.getUsuario());
            } catch (Exception ex) {
                Logger.getLogger(jifKardexAlmacen.class.getName()).log(Level.SEVERE, null, ex);
            }

        if(this.jchkResumenGrupos.isSelected()){
            try {

                jp=GestionPedidosDelegate.getInstance().generarReporteIngreso("ReporteResumenBalanceCuentas.jasper", parametros);
                jv = new JasperViewer(jp, false);
                jv.setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);
                jv.setVisible(true);
            }catch (Exception e) {
                Utiles_MensajesDialogo.mensajeError("No se pudo realizar la transaccion");
            }
        }else{
            try {

                jp=GestionPedidosDelegate.getInstance().generarReporteIngreso("ReporteBalanceMaterialesOperativo.jasper", parametros);
                jv = new JasperViewer(jp, false);
                jv.setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);
                jv.setVisible(true);
            }catch (Exception e) {
                Utiles_MensajesDialogo.mensajeError("No se pudo realizar la transaccion");
            }
        }
    }

    }//GEN-LAST:event_jbtAceptarActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        int res = javax.swing.JOptionPane.showConfirmDialog( this,"Esta seguro de salir?",
                "Confirmar",javax.swing.JOptionPane.YES_NO_OPTION );
        if(res==javax.swing.JOptionPane.YES_OPTION){
            this.dispose();
        }
}//GEN-LAST:event_jButton2ActionPerformed

    private void jbtAceptarKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jbtAceptarKeyPressed
        if (evt.getKeyCode() == KeyEvent.VK_ENTER ){
            this.jbtAceptar.doClick();
        }
    }//GEN-LAST:event_jbtAceptarKeyPressed

    private void jCheckBox2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox2ActionPerformed
       if(this.jCheckBox2.isSelected()){
           this.jchkInversion.setVisible(true);
       }
       else{
           this.jchkInversion.setVisible(false);
       }
       pack();
}//GEN-LAST:event_jCheckBox2ActionPerformed

    private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
        if(this.jCheckBox1.isSelected()){
            this.jcbEmpresa.setEnabled(true);
        } else{
            this.jcbEmpresa.setEnabled(false);
        }
        this.llenarComboEmpresa();
}//GEN-LAST:event_jCheckBox1ActionPerformed

    private void jcbEmpresaKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jcbEmpresaKeyPressed

}//GEN-LAST:event_jcbEmpresaKeyPressed

    private void jcbMesKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jcbMesKeyPressed
        if (evt.getKeyCode() == KeyEvent.VK_ENTER ){
            this.jcbAnio.requestFocus();
        }
}//GEN-LAST:event_jcbMesKeyPressed

    private void jcbAnioKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jcbAnioKeyPressed
        if (evt.getKeyCode() == KeyEvent.VK_ENTER ){
            this.jbtAceptar.requestFocus();
        }
}//GEN-LAST:event_jcbAnioKeyPressed

    private void jchkInversionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jchkInversionActionPerformed

}//GEN-LAST:event_jchkInversionActionPerformed

    private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
       if(this.jRadioButton2.isSelected()){           
           this.jCheckBox2.setVisible(false);
           this.jchkInversion.setVisible(false);
           this.jchkResumenGrupos.setVisible(true);
           this.pack();
       }
    }//GEN-LAST:event_jRadioButton2ActionPerformed

    private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
        if(this.jRadioButton1.isSelected()){          
           this.jCheckBox2.setVisible(true);
           this.jchkInversion.setVisible(false);
           this.jchkResumenGrupos.setVisible(false);
           this.jCheckBox2.setSelected(false);
           this.jchkInversion.setVisible(false);
           this.pack();
       }
    }//GEN-LAST:event_jRadioButton1ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private administracion.BeanBinding.CboBeanBindingEmpresa cboBeanBindingEmpresa1;
    private javax.swing.JButton jButton2;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JCheckBox jCheckBox2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JButton jbtAceptar;
    private javax.swing.JComboBox jcbAnio;
    private javax.swing.JComboBox jcbEmpresa;
    private javax.swing.JComboBox jcbMes;
    private javax.swing.JCheckBox jchkInversion;
    private javax.swing.JCheckBox jchkResumenGrupos;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables

}
